package com.moduls.interfaceFunction.service.impl;

import com.moduls.interfaceFunction.dao.TTestMapper;
import com.moduls.interfaceFunction.model.TTest;
import com.moduls.interfaceFunction.service.TTestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
* Created by MiniGenerator on 2018-05-06T16:12:55.500.
*/
@Service
public class TTestServiceImpl implements TTestService {
    @Autowired
    private TTestMapper tTestMapper;

    @Override
    public int deleteEntityById(String id) {
      return tTestMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int addEntity(TTest tTest) {
        return tTestMapper.insert(tTest);
    }

    @Override
    public TTest getEntityById(String id) {
        return tTestMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<TTest> getAll() {
        return tTestMapper.selectAll();
    }

    @Override
    public int updateEntity(TTest tTest) {
        return  tTestMapper.updateByPrimaryKey(tTest);
    }


@Override
public List<TTest> getAllWhere(String wheresql) {
    return tTestMapper.selectAllWhere(wheresql);
    }

    @Override
    public int batchInsert(List<TTest> list) {
        return tTestMapper.batchInsert(list);
        }

}
